from myelin.rdf.Ns import RDF_MS_BASE

#from myelin.rdf.bindery.FlatModel import Model
from myelin.rdf.bindery.ScopedModel import Model

from myelin.Ns import MYELIN, MYELIN_RULES

from mappings import \
    BaseMap, \
    TypesMap, \
    RuleMap

from ObjectTypes import \
    ResourceTypeO, ResourceTypeS, \
    ClassTypeO

from rules.ObjectTypes import \
    RuleTypeS

class Resource(Model):
    
    ModelTypes = (ResourceTypeO, ResourceTypeS)
     
    RDF_BINDINGS = {
        'mType'   : ((RDF_MS_BASE, 'type'), ClassTypeO, BaseMap),
        'rdfType'   : ((RDF_MS_BASE, 'type'), ClassTypeO, TypesMap),
        'rRule_For' : ((MYELIN_RULES,'rule-for'), RuleTypeS, RuleMap),
    }

    
CLASS_TYPES = {
    MYELIN + 'Resource' : Resource,
}